import request from '@/request'
import { C2B } from '@/utils/wordtransfer.js'

// 查询搜索并分页
export const findPages = (specialId) => {
    return request.post(`/special/bind/list?specialId=${specialId}`, {})
}

// id查询明细
export const getById = (id) => {
    return request.post(`/special/bind/get/${id}`, {})
}

// 保存和更新
export const saveUpdate = (data) => {
    return request.post('/special/bind/saveupdate', data)
}

// 修改状态
export const updateStatus = (id, field, value) => {
    field = C2B(field)
    return request.post(`/special/bind/status/${id}/${field}?value=${value}`, {})
}

// 物理删除
export const removeById = (id) => {
    return request.post(`/special/bind/remove/${id}`, {})
}

// 复制
export const copyData = (id) => {
    return request.post(`/special/bind/copy/${id}`, {})
}
